/**
 * @file    dev_rtc.h
 * @brief   外部设备驱动-RTC驱动
 * @author  Liuwei
 * @version 1.0.1
 * @date    2023-04-22
 * 
 * @copyright Copyright (c) 2023 JBD-Energy Storage Technology Co. LTD
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version   <th>Author   <th>Description
 * <tr><td>2023-04-22 <td>1.0.1     <td>Liuwei   <td>首次创建
 * </table>
 */

#ifndef __DEV_RTC_H_
#define __DEV_RTC_H_

/* file includes -------------------------------------------------------------*/
#include "mcu_type.h"
/* cplusplus -----------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif

/* macro/define/typedef ------------------------------------------------------*/
#include "drv_rtc.h"
/* @brief */
#define RTC_REG_SEC      (0x00)
#define RTC_REG_MIN      (0x01)
#define RTC_REG_HOUR     (0x02)
#define RTC_REG_WEEK     (0x03)
#define RTC_REG_DAY      (0x04)
#define RTC_REG_MONTH    (0x05)
#define RTC_REG_YEAR     (0x06)
#define RTC_REG_STATUS   (0x07)
#define RTC_REG_IN_CTRL  (0x08)
#define RTC_REG_ALARM    (0x0C)
#define RTC_REG_ALARM2   (0x12)

//#endif 
/* variables -----------------------------------------------------------------*/

/*******************************************************************************
 * public API List
 ******************************************************************************/
void dev_rtc_init(rtc_data_type rtc_init);
uint8_t dev_rtc_read_date_time(rtc_data_type *rtc_data);
uint8_t dev_rtc_set_date_time(rtc_data_type set_val);
uint8_t dev_rtc_read_status(uint8_t *status);

#ifdef __cplusplus
}
#endif

#endif  /* #ifndef __DEV_RTC_H_ */
/********** Copyright (c) 2023 JBD-Energy Storage Technology Co. LTD *********/
